package com.AJava1710D.bingfabao.condiation2.useCondiation;

import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;

/**
 * @author: LCG
 * 作者: LCG
 * 日期: 2020/10/7  10:54
 * 描述:
 */
public class TeRunable3 implements Runnable{

    private Condition yyy;

    private Lock lock;

    public TeRunable3(Condition yyy, Lock lock) {
        this.yyy = yyy;
        this.lock = lock;
    }

    @Override
    public void run() {
        lock.lock();
        try {
            yyy.await();
            System.out.println("================000003");
        } catch (InterruptedException e) {
            e.printStackTrace();
        }finally {
            lock.unlock();
        }
    }
}
